[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
setaspectratio() Set the Aspect Ratio
#include <graphics.h>
void far setaspectratio(xasp, yasp);
int xasp; X aspect
int yasp; Y aspect
This function sets the aspect ratio. The value of yasp should
be 10,000; xasp should be the same for square pixels as in the
VGA and less than that value for tall pixels (as on other
monitors).
Returns: Nothing.
-------------------------------- Example ---------------------------------
The following statements draws a circle with aspect ratio 2:1.
#include <graphics.h>
int gdriver = DETECT;
int gmode;
int x;
main()
{
initgraph(&gdriver,&gmode,"");
cleardevice();
setaspectratio(20000, 10000);
circle(300,150,100);
getch();
closegraph();
}
See Also:
getaspectratio()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson